package com.diandian.backend.entrance.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public final class HhrErpPageResultDTO<T> implements Serializable {

    private List<T> list;
    private Long total;

    public HhrErpPageResultDTO() {
    }

    public HhrErpPageResultDTO(List<T> list, Long total) {
        this.list = list;
        this.total = total;
    }

    public HhrErpPageResultDTO(Long total) {
        this.list = new ArrayList<>();
        this.total = total;
    }

    public static <T> HhrErpPageResultDTO<T> empty() {
        return new HhrErpPageResultDTO<>(0L);
    }

    public static <T> HhrErpPageResultDTO<T> empty(Long total) {
        return new HhrErpPageResultDTO<>(total);
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }
}
